EMT Practice Test

1. Question Content...


Question List

Question1: What independently inside the add_new () method in order to make the snippet's output equal to [0, 1, 1] ? (Select two answers)

Question2: A property that stores information about a given class's super-classes is named:

Question3: Which of the following expressions evaluate to True? (Select two answers)

Question4: What is true about Python class constructors? (Select two answers)

Question5: Which of the following lambda function definitions are correct? (Select two answers)

Question6: What is the expected output of the following snippet?

Question7: A variable stored separately in every object is called:

Question8: How many lines does the following snippet output?

Question9: What is the expected output of the following snippet?

Question10: What is the expected behavior of the following code?

Question11: Which of the following statement are true? (Select two answers)

Question12: Which one of the platform module functions should be used to determine the underlying platform name?

Question13: What is the expected behavior of the following code?

Question14: Assuming that String is six or more letters long, the following slice
String[1:-2]
is shorter than the original string by:

Question15: An operator able to perform bitwise shifts is coded as (select two answers)

Question16: Assuming that the following snippet has been successfully executed, which of the equations are False? (Select two answers)

Question17: What is the expected output of the following code if there is no file named non existing_file inside the working directory?

Question18: Assuming that the snippet below has been executed successfully, which of the following expressions will evaluate to True? (Select two answers) string = 'python' [::2] string = string[-1] + string[-2]

Question19: What can you do if you don't like a long package path like this one?

Question20: The following class hierarchy is given. What is the expected output of the code?

Question21: What is true about Object-Oriented Programming in Python? (Select two answers)

Question22: Which of the following statements are true? (Select two answers)

Question23: Assuming that the code below has been executed successfully, which of the following expressions will always evaluate to True? (Select two answers) import random v1 = random. random() v2 = random. random()

Question24: A compiler is a program designed to (select two answers)

Question25: The following class hierarchy is given. What is the expected out of the code?

Question26: You need data which can act as a simple telephone directory. You can obtain it with the following clauses (choose two relevant variants; assume that no other items have been created before)

Question27: The following expression
1+-2
is:

Question28: A method for passing the arguments used by the following snippet is called:

Question29: What is the expected output of the following code?

Question30: What is the expected behavior of the following code?

Question31: What is true about Python packages? (Select two answers)

Question32: Which of the following expression evaluate to True? (Select two answers)

Question33: A Python module named pymod, py contains a function named pyfun ( ).
Which of the following snippets will let you invoke the function? (Select two answers)

Question34: What is a true about python class constructors? (Select two answers)

Question35: The simplest possible class definition in Python can be expressed as:

Question36: What is true about Python packages? (Select two answers)

Question37: Which of the following lambda definitions are correct? (Select two answers)

Question38: What is the expected output of the following code?
def foo(x,y,z):
return x(y) - x(z)
print{f00(lambda x: x % 2, 2, 1) )

Question39: What is the expected behavior of the following code?

Question40: What is the expected output of the following code?

Question41: What is the expected behavior of the following snippet?

It will:

Question42: If you need a function that does nothing, what would you use instead of XXX? (Select two answers) def idler ( ):
XXX